/*
 * TODO: License
 */

package com.rppowell.pixie.swing.map;

import com.rppowell.pixie.models.Map;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

/**
 *
 * @author rppowell
 */
public class MapWorkArea extends JPanel{
    private MapCanvasPanel canvas;

    public MapWorkArea(Map map) {
        setLayout(new BorderLayout());
        canvas = new MapCanvasPanel(map);
        JScrollPane scrollpane = new JScrollPane(canvas);
        scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        add(scrollpane, BorderLayout.CENTER);
    }
}
